package com.learn.strategy;

import lombok.extern.slf4j.Slf4j;

/**
 * <p>项目名称: design-pattern </p>
 *
 * <p>文件名称: App </p>
 */
@Slf4j
public class App {

    public static void main(String[] args) {
        DragonSlayer slayer = new DragonSlayer(new SpellStrategy());
        slayer.battle();
        DragonSlayer slayer2 = new DragonSlayer(new ProjectileStrategy());
        slayer2.battle();


        DragonSlayer slayer3 = new DragonSlayer(()-> log.info("火攻屠龙"));
        slayer3.battle();
        DragonSlayer slayer4 = new DragonSlayer(()-> log.info("刀剑屠龙"));
        slayer4.battle();
    }
}
